package org.oep.widgets;

import javax.microedition.lcdui.Graphics;

public abstract class Widget {
	protected int x, y;
	protected boolean active;
	
	public abstract void paint(Graphics g, int x, int y);
	public abstract int getWidth();
	public abstract int getHeight();
	
	public void paint(Graphics g) {
		paint(g, x, y);
	}
	
	public int getX() {
		return x;
	}
	
	public int getY() {
		return y;
	}
	
	public boolean active() {
		return active;
	}
	
	public void setPosition(int x, int y) {
		this.x = x;
		this.y = y;
	}
	
	public void setActive(boolean b) {
		active = b;
	}
}
